<template>
	<view class="materialsEntry">
		<!-- 材料入库 主页面-->
		<navBar title="材料入库" goBackUrl="/pages/homePage/platform" @goBack="goBack"></navBar>
		
		<scroll-view scroll-y="true" class="scroll-box">
			<view class="content">
				<view class="center">
					<view class="nav">
						<view class="imageBox" >
							<image class="img1" src="/subpackage-materials/static/tijiao2.png" mode="" @click="getClick(0)"></image>
						</view>
						
						
						<view class="imageBox">
							<image class="img1" src="/subpackage-materials/static/look2.png" mode="" @click="getClick(1)"></image>
						</view>
						
					</view>
					
					<!-- 材料入库 发起提交 -->
					<entrySubmit v-if="isShow"></entrySubmit>
					<!-- 材料入库 查看记录 -->
					<entryLook v-else></entryLook>
				</view>
			</view>
		</scroll-view>
		
	</view>
</template>

<script>
	import entrySubmit from "./components/enrtySubmit.vue"
	import entryLook from "./components/entryLook.vue"
	export default {
		name: "materialsEntry",
		components: {
			entrySubmit, entryLook
		},
		data() {
			return {
				isShow: true,
			}
		},
		methods: {
			getClick(num){
				if(num === 0){
					this.isShow = true
				}else{
					this.isShow = false
				}
			},
			
			// 返回上一级
			goBack(url){
				uni.switchTab({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.materialsEntry{
		/* #ifdef MP-WEIXIN */
			padding-top: 180rpx;
		/* #endif */
		.scroll-box{
			max-height: calc(100vh - 170rpx);
			padding-top: 10rpx;
		}
		.content{
			background-color: #F5F7FA;
			padding-top: 30rpx;
			.center{
				background-color: #FFFFFF;
				padding:0rpx 28rpx;
				.nav{
					padding-top:20rpx;
					display: flex;
					justify-content: space-between;
					height: 113rpx;
					margin-bottom: 10rpx;
				}
				.imageBox{
					width: 328rpx;
					height: 110rpx;
				}
				.img1{
					width: 328rpx;
					height: 96rpx;
				}
			}
		}
	}
</style>
